package com.hiwhitley.easy.day06;

/**
 * Created by hiwhitley on 2016/8/6.
 */
public class Solution1 {

    public static int JumpFloor(int target) {
        int a = 1, b = 1, c = 0;
        if (target < 2) {
            return target;
        }

        for (int i = 2; i <= target; i++) {
            c = a + b;
            a = b;
            b = c;
        }
        return c;
    }

    public static void main(String[] args) {
        System.out.println(JumpFloor(2));
    }
}
